<?php

class Application_Form_Login extends Zend_Form
{

    public function init()
    {
         $this->setName('Login');
		
		$usuario = new Zend_Form_Element_Text('login');
		
		$usuario->setLabel('Login')
				->setRequired(true)
				->addFilter('StripTags')
				->addValidator('NotEmpty')
				->setDecorators(array(
					'ViewHelper',
					'Label',
					'Description',
					array('label',array('tag'=> 'br'))
					));
				
				
		$senha = new Zend_Form_Element_Password('senha');
		
		$senha->setLabel('Senha')
				->setRequired(true)
				->addFilter('StripTags')
				->addValidator('NotEmpty')
				->setDecorators(array(
					'ViewHelper',
					'Label',
					'Description',
					array('label',array('tag'=> 'br'))
					));
				
		$submitButton = new Zend_Form_Element_Submit('entrar');
		
		$submitButton->setLabel('Entrar');
		$submitButton->setAttrib('id','entrar')
					->setIgnore(true)
					->setDecorators(array(
						'ViewHelper',
						'Description',
						array('HtmlTag',array('tag'=>'br'))
					));
					
		
		$this->addElements(array($usuario,$senha,$submitButton));
		
		$this->setAction('/auth')->setMethod('post');
    }


}

